<br/>
<?if($errors):?>
<?foreach ($errors as $error):?>
<div style="color:red"><?=$error?></div>
<?endforeach?>
<?endif?>


<?=Form::open('admin/products/edit/' . $id)?>
        

<h3>група товарів</h3>
<select name="group_id">
<?foreach ($prodGroups as $prodGroup):?>   
    <option value="<?=$prodGroup->id_number?>"
    <?if($prodGroup->id_number==$group_id):?>
            selected
    <?endif?>
    >
    <?=$prodGroup->product_name?>
    </option>
<?endforeach?>
</select>
<br>


<h3>підгрупа товарів</h3>
<select name="sub_id">
<?foreach ($subGroups as $subGroup):?>   
    <option value="<?=$subGroup->id_number?>"
    <?if($subGroup->id_number==$sub_id):?>
            selected
    <?endif?>
    >
    <?=$subGroup->catalog?>
    </option>
<?endforeach?>
</select>
<br>

<h3>компанія</h3>
<select name="brand_id">
<?foreach ($brands as $brand):?>   
    <option value="<?=$brand->id_number?>"
    <?if($brand->id_number==$brand_id):?>
            selected
    <?endif?>
    >
    <?=$brand->company_name?>
    </option>
<?endforeach?>
</select>
<br>
            
<h3>назва товару</h3>
<input type="text" size="50"                                                   
name="name"  
value="<?=$name?>">
<br>

<h3>ціна</h3>
<input type="text" size="50"                                                   
name="price"  
value="<?=$price?>">
<br>
            



<h3>опис товару</h3>
 <textarea name="about1" 
rows=20
cols=50><?=$about1?> 
</textarea>           


<?=Form::submit('submit', 'Редагувати')?>            
<?=Form::close()?>   
